package com.lpit.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 公告表
 * @TableName affiche
 */
@TableName(value ="affiche")
@Data
public class Affiche implements Serializable {
    /**
     * 
     */
    @TableId
    private Integer id;

    /**
     * 公告标题
     */
    private String afficheHeadline;

    /**
     * 公告内容
     */
    private String afficheContent;

    /**
     * 公告发布时间
     */
    private Date releaseTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Affiche other = (Affiche) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getAfficheHeadline() == null ? other.getAfficheHeadline() == null : this.getAfficheHeadline().equals(other.getAfficheHeadline()))
            && (this.getAfficheContent() == null ? other.getAfficheContent() == null : this.getAfficheContent().equals(other.getAfficheContent()))
            && (this.getReleaseTime() == null ? other.getReleaseTime() == null : this.getReleaseTime().equals(other.getReleaseTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getAfficheHeadline() == null) ? 0 : getAfficheHeadline().hashCode());
        result = prime * result + ((getAfficheContent() == null) ? 0 : getAfficheContent().hashCode());
        result = prime * result + ((getReleaseTime() == null) ? 0 : getReleaseTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", afficheHeadline=").append(afficheHeadline);
        sb.append(", afficheContent=").append(afficheContent);
        sb.append(", releaseTime=").append(releaseTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}